#include <iostream>

using namespace std;

class Point
{    
    double  x, y;

public:

    Point(double x=0, double y=0): x(x), y(y) {}

    double getX() { return x; }

    double getY() { return y; }

};

class Rectangle
{
    Point p1, p2;

public:

    Rectangle(Point p1, Point p2): p1(p1), p2(p2) {}

    double area();
};

double Rectangle::area()
{
    double height = abs(p2.getY() - p1.getY());
    double width = abs(p2.getX() - p1.getX());
    return height * width;
}

int main()
{
    Rectangle rect(Point(-1,1), Point(-5,8));
    cout << rect.area() << endl;
    return 0;
}